<?php

namespace App\Http\Controllers\Mobile;


use App\Logics\EncryptLogic;

class EncryptController extends BaseController
{
    // 一般操作
    public function initialize()
    {
        parent::initialize();
    }

    // 配置
    public function config()
    {
        $config = (new EncryptLogic())->config();

        return $this->success($config);
    }

    // 加密
    public function en()
    {
        $config = (new EncryptLogic())->encode();

        return $this->success($config);
    }

    // 解密
    public function de()
    {
        $config = (new EncryptLogic())->decode();

        return $this->success($config);
    }


    // 解密2
    public function de2()
    {
        $config = (new EncryptLogic())->decode2();

        return $this->success($config);
    }


    // 解密 + 加密 综合
    public function test()
    {
        $res = (new EncryptLogic())->all();

        return $this->success($res);
    }


    // js 展示
    public function js()
    {
        $res = (new EncryptLogic())->js();
        die(nl2br($res));
    }


}


